home *** CD-ROM | disk | FTP | other *** search
- Path: news.cis.nctu.edu.tw!usenet
- From: terryt@mcs.com (Terry Trippany)
- Newsgroups: comp.lang.c++
- Subject: Re: VC++: AppWizard without standard menu/toolbar
- Date: 3 Jan 1996 00:16:59 GMT
- Organization: STR
- Message-ID: <4cchtr$6j2@news.cis.nctu.edu.tw>
- References: <4c1keu$7ed@walrus2.walrus.com>
- NNTP-Posting-Host: @terryt.pr.mcs.net
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <4c1keu$7ed@walrus2.walrus.com>, sharpe@walrus.com says...
- >
- >Hello everyone,
- >
- > I have a question, that is begging for an answer. I am using Visual C++
- v4.0's
- >AppWizard to get a SDI window. I need to know, how can I have the AppWizard
- >NOT include the standard menu and toolbar (File, Edit, View etc.) ? The result
- should
- >be a blank window, with a title bar only. If not, how can I delete them
- without disturbing it
- >or doing it manually ? Thanks in advance.
- >
- >
- >Jamiel Humayun
- >Sharpe Capital, Inc.
-
- Jamiel,
-
- Hello, this an be done by overriding the CFrameWnd::PreCreateWindow() member
- function as follows:
-
-
- BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- if(cs.hMenu!=NULL)
- {
- DestroyMenu(cs.hMenu);
- cs.hMenu = NULL;
- }
-
- return CFrameWnd::PreCreateWindow(cs);
- }
-
- - you can also do the same with the style bits to alter the start appearance or
- do things like
- eliminate the system menu.
-
- Good luck,
-
- Terry Trippany
- terryt@mcs.com
- Strategic Technology Resources
- Chicago, IL
-
-
-